Allowing arbitrary number of input maps