added interface for persistence, TODO: revise method names
small fixes