finished off arraymanipulations