updated function to their final version. added css to display bubbles