refactored for more data binding in the xaml