indent & condition added in save function