try to improve the efficiency