revised theory part as suggested by Ming today