set read only instance variables correctly