Code added to functions to perform required ops.