Uses class param instead of variables.