fixed broken decay function