tidied up marker bubble code