adding models and logic