finished button logic