partial code for 2-52