Combined save functions into one