only deal with flat dir now