fix schema; add unit tests