made changes for OS compatibility