removed old code and cleaned up formatting