Implementation completed. Need to test.