change way data is returned. was crashing library previously