Add the magic formula script