Update implementation and tests