re-organize methods and fix the compatible problem with a little trick…Now we can support the older api