added arrays, loops