solved the multiple window problem by making the comm_id unique but need to handle other cases