fix some issue with validate;add zeroMatrix function