merging with sharanya's code