Method of purification of organic compounds