removed old code and bad call