created separate function for parsing tweets