code cleanup before the hard work