refactored the other overly long method in the api. I think the api module is now looking presentable