still merging this, but putting a "TODO" tag for later improvement