Added return of mask.length

This is to check the validation on delay of 4 seconds