housekeeping move code around