cleaned up code for cut and paste