refactoring. separated resource specific handling methods