working now with ushorts instead of char* buffers :)