compute theta when loading