refactoring

edited regex to return correct array