added some comet stuff, took away conditional code