factor out logic to own module