updated for pi and mac