fixed many bugs, but still can't work