database connected and model setup