front page and api now returns dictionary