added automatic time logging