commented out the theta line to make the code compile. Need to fix this.