working on token validation