updated main and model files