rebuilt the api to use an option class method