Implemented escape function