put the params in its own function