cleaned up coding errors