turns the array test into a func