Adding module to make code more DRY