Loop in place of push.apply