move location to end of params and make optional