need to further optimization