working code NOT RIAKCORE enabled