improves (move to utils)