working with num as var in arrays