Implemented David's class