Added recording spectrum (to be tested).