added separate thread for looping stuff
merge completion