Reformated code to remove copy pasted text.