more comments added

these functions are fully commented now