added test to verify end operator