applying styles and saving data