first working algorithm for positive alpha