This code is kinda awful but this looks nicer on mac now