function refund() public returns (uint) {

        require(now >= endTime);

        
        uint refundAmount = address(this).balance;

        buyer.transfer(refundAmount);

        emit Refund(buyer, refundAmount);

        return refundAmount;
    }