update css and function