refactoring code for servo
removed deps