Use POP to refactory

Also there’re still some bugs