Trouble with octal numbers, but what I have works