start separating logic