add java6 compatibility