Working version of converting decimal to octal