added typed array support