second attempt at trying to fix time problem