ac losses in REBa2Cu3O7−y superconductors