get device type using the provided function