creating persistence layer (unfinished)