schema now uses dict instead of lists. fixes #2