Comments added and function match updated