borrowing from twitter gem
trimming back