more sensible input loop