added comments w.r.t. potential performance problems