fixed to new logic