implementing persistence