removed java7 api usage