rewriting dir/play functions cont. 2