fix failures and make measures return hash