ADDED MORE COMMENTS IN FUNCTION