cleanup
fix select assign
remove unneeded code in unreachable