updating the code following the style sheet