fix conditional to check algo