working on cleanup routines