support infer base
support infer base.Fixes #5