finish impelemntation