fixed function inputs
fixed function inputs
assorted small fixes