problemA solution and four tests