removed tilts and changed cos function