dealing with type and output