Changes to get assignment func in queries