fixing java 7 compatibility