prettified version, refactored modules