fix some typos and make  static