starting comet js functionality