converted to java 7, deleted useless comments