escape functionality working as expected