rewriting dir/play functions cont. 3