cleaning up so it works on mac compiler