public void performButton(GameModel myModel) {
    	myModel.getMap().unhighlightRange(
                targetTileBackground());
        if (!myModel.getSelectedUnit().hasAttribute(Attribute.ATTACK)) {
            return;
        }

        AttributeAvailableActions availableActions = (AttributeAvailableActions) myModel.getSelectedUnit()
        .getAttribute(Attribute.AVAILABLE_ACTIONS);

        if ((availableActions).isAttributeUsed(Attribute.ATTACK)) {
            return;
        } else {
            availableActions.usedAttribute(Attribute.ATTACK);
        }
        
        AttributeAttack attack = (AttributeAttack) myModel.getSelectedUnit()
                .getAttribute(Attribute.ATTACK);
        if (attack.getAttacksLeft() < 1) {
        	GameMode.setCurrState(GameMode.SELECTED);
            return;
        }

        Unit myUnit = myModel.getSelectedUnit();

        int attackDistance = myModel.getSelectedTile().getDistance(
                myModel.getSelectedDestination());

        if (attackDistance > attack.getAttackRange()) {
            return;
        }
        if (myModel.getSelectedDestination().getUnit() == null) {
            return;
        }
        Unit target = myModel.getSelectedDestination().getUnit();
        ArrayList<Unit> myUnitsList = myModel.getCurrentPlayer()
                .getPlayerUnits().getData();

        if (myUnitsList.contains(target)) {
            return;
        }
        if (!target.hasAttribute("Health")) {
            return;
        }
        
        // send target to AIstateController
        AIstateController.sendInteraction(target);
        
        AttributeHealth health = (AttributeHealth) target
                .getAttribute("Health");
        health.decrementHP(attack.getAttackDamage());
        attack.decrementAttacksLeft(1);
       
        if (health.getHP() <= 0) {
            target.beDestroyed(myUnit,myModel.getMap());
        }

    }