revised function

changed body function
removed comments

deleted old comments