clean up code, add potential different sizes