not using com.sun.tools.javac.util.ListBuffer, code cleaned up