a bit more code clean up