added exception handling for invalid query
added new exception for invalid query
usual update here
minor changes
created test suite skeleton for engine