Made a generic handler taking up to 5 parameters