separated logic