Orignal Code