added the use of df_complex and changed fprintf to ERROR for error
messages.  Also changed variable names to follow recommended standard
from the website.