better calc of when left