prepared for pluggable implementation.
 (initial implementation marked as 'naive')