style and add some functions