updated follwoing TK's comments