added params validation