fetch and decode bubbling functions
merged lab12