extract methods into modules
refactor and reorganizing client and resource methods