use of .find and .closest and switch