change to use schemas instead of defmodels