[Evgeny, Jason] toArray function w. test