increased efficiency, fixed bad output