parse arguments and send data to db