implemented the rest of methods