adds save method