removed old code and fixed formatting