added getAttack and getData functions, comments