some fixes and parameterization