commit function for model user