rename functions
fix $.fn.extend, and refactor