denominator fixed, testig code, not going through loops correctly