function for window platfrom