change api call to make it work on 1.6 jvm