splitting to logic