returning array instead of setting a var