validate function added
redefined contract of binary reader and value reader