adding constantFolding function