changed up that logics