major refactoring of functions and main code
 added calculatedDamage function
final commit