make rest json working