add dump flag TODO: workout how to implement it