use java 7 features where applicable