interactive mode implemented, error handling is slightly more graceful.