added apple ifdef