array_join refactor