fix bugs, basic completed