handle params correctly