added more function and more fix