some more code clean up