merge with app logic