Added helper functions to find elements