toward fixing type system to pass tests