refactored framesupervisor