made code mac friendly