add support for typing
fix persistence spec