Code adapted to support multiple parameters