some bugs fix, doesn't work yet