Made Precomputing a separate method