updated code & spell checking