removed old code, fixed type