added firepower and some code optimisation