added gaurds for changing readonly objects