use parameters class instead of variable passing