I think you are right that this function could be improved, but unsure on this particular comment. What are you suggesting?