added conditional for cleaning up and 61B project 2