completed basic mnesia backend code.