added method for parsing cli options