Adding alter function, documentation, and tests.