fixed some bug, prepare for feedback