solutions to arrays loops chater