rewrote to attack and decay model