add assertion for required params.