working on solving for cubic intersection