fix bugs. make runneble