moved around constructor