folding functionality added!!!!!