set up firebase and threads