simplified the last change a bit