Function works in java7 too.