added matrix test
tested rescaling unctions and times them. see comments for time info.