Added comments for each functions