piece vision function working