Hw3branch

Made the code faster.