possibly fixing some logic