Added custom functions only for mac