Refactored into yield block, added get tweet function