some more polishing after tips from francesco