add time saving logic