made some modifications in order to allow for additional command-line arguments