initial solution to waldorf.c yay