added arrays and console log print outs