saving data to repo model working