fix bugs, add some get methods