Finished the implementation