private void trackButtons (MouseInfo m){
        List<Actor> l = getObjectsAt (m.getX(), m.getY(), null);        //list of all the actors the mouse is ontop of
        if (l.size() == 1 && l.get(0) instanceof Ui){ 
            //if its just the ui, not hovering over a button
            if (prevButton != null){
                prevButton = prevButton;
                prevButton.resetCounter();
            }
            prevButton = null;
        }
        else{
            for (Actor a: l){
                if (a instanceof Button){       //if the mouse is ontop of a button, change the pic
                    Button b = (Button) a;
                    b.changeImg (true);
                }
                if (a instanceof HoverInfo){       
                    HoverInfo h = (HoverInfo) a;
                    if (h == prevButton){
                        h.hoverOver();
                    }else if (prevButton != null){
                        prevButton.resetCounter();
                    }

                    prevButton = h;
                    return;
                }
            }
        }
        removeObject (hm);
    }