linking the model in querywriter