shitty cubic function