Implemented the most of functions
To-do:
1) javadoc
2) test codes