Logic moved to test