initial implementation of dist mode