first rewritten modules
rebuild database read and write functions