implemented update theta method