added mac learning support