use a much simpler implementation