turned the json get and put calls into functions