const method isnt working on mac