reverted back to simple function definitions.