added documentation to go code.