doing some cleaning to compile into one file