Green poop

My 2 month old has green poop. He’s been really fussy as well and looks like he is in pain and having difficulty going to toilet (not hard poop tho). What causes the green colour? It’s not normally like this