added test with five inputs