added escape function