pset7: completed - Lambda solution didn't worked - cascaded if's replaced