wrote first version of discrete_log