moved constructor