Feature/cop

This function is duplicated in calculate.clj. Is it different in any way?