Added save() method and it implementation.