Made the progra more efficient