Functional versionb with hooks for human-friendly actions