changes for making the original script work with GAE channels