change to accept json