updated code for kona libs, not quite working yet.