better formatting and how to terminate master query