study other's elegant code and add summary