simplified window hint function code