updating styles and trimming function