drying up some of the code