added comments

comments added to pathing function