refactored some custom get/post calls