added shelfCheck function