finish basic function of checkout system