implemented rmdir method