added global mouseX and mouseY

old implementation is commented out