second iteration - with shift()... functions