updated twitter and getallimages logic