added measurements and init code