added more intelligence to twitter class