beginning of "real" database implementation