changed handler params to be an object