fix functions and styles again