a more practical version of getLine???