added inmemory persistence class