use constant TIMEOUT properly