fixed segfault by switching u & theta back to variables of the struct Parameter