modified the class snippet