logic, works well