adjust UI, fix code