services code refactor done