changed how finding the function recognizes rgb