corect implementation of escape