prepare to handler from terminal