bug fixing and adding numparameters to echo data function