finishing up checkout function