trying to handle different distributions of unix