Changed queries
new version
Divided payment and transaction
new version