adding functions for twitter and logging