histogram functions added