version with contstructor