constructor to read arguments from string