clean up and comment previous code