bugs debugged, variables made public
added additional debug mode, not yet operational