errors adjusted and naming variables and functions

several errors were adjusted visualization and naming names of variables
and functions was updated late