rework some code
add qrcode