moving params converting logic to router