Solved! I learned something in algorithms class. Although, this could be done with more refactoring