almost sorted out dec2bin function