finished problem set 1: encryption