refactored way of checking for zfs