housekeeping to real code