implemented the implement method
added some tests