added logic for completed levels