Added actual implementation and tests
Added actual implementation and tests