removed some bugs in argument pasring