added params and error checking example