added some modification in doc and print
added inavalid calling of engine whene input is invalid