added parameterization and documentation