make mode configurable
cleanup