add spectrum generation