changing model to arrays