added compatibility for windows7+