modified constructor