finished listener thread
fixed merge conflicts