updated code with styling and spelling