models and save functionality added