Developing a Compton polarimeter to measure polarization of hard x-rays in the 50-300 keV energy range