todo fixe into controller's save function