reorder args a bit to be more logical