refractor inference and composition into their own things