added commentary describing problems with function