fixup the last commit and improve on it