Hadron-quark phase transition in dense stars