added repa-based spectrum utils and so on