Complex sentence: Law was appointed as Sri Lanka's assistant coach in October 2009, where ended up taking charge as the head coach as Trevor Bayliss left shortly after the 2011 world cup.
Split into simpler sentences: Law was appointed as Sri Lanka's assistant coach in October 2009. He was then head coach in 2011-2012 when Trevor Bayliss left shortly after the 2011 world cup.