Implemented logic for 5 different levels.