bug in last commit code corrected
redirect after trash code modified