added custom bin threshold from user