useful functions, and script for preparing tweets