added conditional checking for ACF