Changed output type to correspond to input type.
Made output type same as input type (float->float, list->list).