catched some errors, and it'll be final commit in this semester