finished problem 3: multi-level encryption