add loop in main for recieving terminal input