styling and formatting with javascript