started rewriting dir/play functions