add ability to get profile from queries, mvar to tmvar