checkign values within splice loop