fixed syntax error, added timeout state