automatic refresh of terminal