added method to recognize os x