fixing bugs; AWARE processing code seems to work ok