refactor fyp