restored java 6 compatibility