wrote new lib controller