factor out thought bubble code into seperate file