added json mode and coffee mode