efactoring to Tmx.Client