before cleanup
cleaned up and commented