first attempt at JSON api for new requirements