moved multiplication of words out to it's own subroutine