refactored work with fps;