added lib for models and db calls