somewhat finished. calculating total now.