added support for double and float arrays (float untested, yet)