debug
add pay logic