shorten lines and correct test