added routes + resources; refactored