only updating on minute, reorg'd code