update for Mac compatibility