replace code in save controller by the save service