refactoring for converting raw data to signed 16-bit int