adding better models and adding api endpoints back