timer and validation