full JSON functionality