code and misc