added streq function and improved serial exception macro