final checkout function