function buyPack(uint256 _amountOfTokens) public payable {
        require(packsToWei[_amountOfTokens] > 0);
        require(msg.value >= packsToWei[_amountOfTokens]);
        require(isPausedForSale == false);

        _mint(msg.sender, _amountOfTokens * 1 ether);
        (msg.sender).transfer(msg.value.sub(packsToWei[_amountOfTokens]));

        totalEarnings = totalEarnings.add(packsToWei[_amountOfTokens]);
        totalEarningsForPackSale = totalEarningsForPackSale.add(packsToWei[_amountOfTokens]);

        emit PackBought(msg.sender, _amountOfTokens, packsToWei[_amountOfTokens]);
    }