code redesign - base