adding linklist for maths