updated manuscript, working on distance windows