lab1 migrate to arrays