add a getselectedtile function