new changes in cal
merged code after removing conflict