Changed order of arguments to produce a simpler API