started work on refactoring json backend