Add init function for model