add algorithm: calc words