added frequency dependent losses (and demo)