refactor the argument checking
don't shift the arguments (now always 0 or 1)
sanitize whitespace
indent bad_behaviour
make the bad behaviour a function of its own