fixed previous errors, now working with ints