implemented models, basic frontend javascript interaction