minor cleaning up of code