added TERM variable setting