Added ios support, changed it so it works for Mac