fix #6 + now working with java 6 (only java 7 previously)