updated to accommodate all OS