preparation work for JSON API