Added option to specify bins