add code for binned profiles