a bit more code cleanup