logic converted