adding the possibility to export as JS array