created a function to add the sides up