rewriting dir/play functions cont. 4