refined and fixed