added save goal functionality