add hack to limit measurement
and clean