fixed set_scale and added extract utility