refactored the skills controller