add models and basic logic