(#13) - use switch statements, fix zero usage