added a better way to measure safeness