add test for end level logic