working on modified cubic