add exception handling, persistence and rpc of schema