moving tweet logic out of route