change order of arguments of callback