Rename finished function to is_finished