add comments. remove old code