implemented most of the interfaces