commands and enhanced reescape function