changed the style code in some functions