updated code to follow standards