change .pop arguments to parameters

that way it doesn't depend on the order of the arguments and there's no
need to add null or empty arguments.