Added more signal processing code