add default case, fix whitespace atrocities