added method to get input fields and output fields (instead of just 'fields')