write while join