added some extra tables for faster lookups in attach