Rename finished() function to is_finished() to make it more readable