better error message for bad args
remove allocation