moved view model to queries