removed useless string variable and updated getBin function sig