turned it into a module for easier (re-)use