add esc and fix test