#109 refactored to pmardle WIP