added persist method, todo implementation