Finish put function and test.