added API and JSON