comments for functions and data structures added