Changed functions to use find_if and lambda functions
instead of looping through the containers