added OS detection