added reset of terminal