flexible histogram