remaking for JSON