added assertion
moved member variable