changed MAX_LIFETIME to be a function of SPEED