use a waitfor and only master db