update escape sequences and move to proper location