add code for the challenge problems