solutions for several programming challenges