made it check OS and act accordingly