added some array magic