removed unused variable, improved formatting