cleaned up code, eliminated hidden and unneccesary code.  final copy