added error handling for no arguments and incorrect arguments (see issue #1)