move apt check to its own function,
 makes it easier to add other package managers later on
cosmetics, cleaner return value passing