How does tamoxifen work in treating cancer