fix the order in which the params are passed
add defaults for user