improved handling of arguments