var amountofallowance function added