Added Documentation

Added documentation to the c source file