comments for all functions updated