parameters validation refactor