Not neccessary to use loop, but it is more versatile