added null object and altered the api