added the guid function to the put.js
added tests and assertions.