more homework, and code for checking binary