need to add exceptions, and -- one again -- rewrite the database schema. also need a cmdline interface for now