refactored
removed old prototype