finish basic logic and pass compile
next: test and debug