Reuse variables in edwards function; use shift instead of mult