unions merged. result function takes arguments and is more statically data driven. hmac merged into one function which will be made increasingly effiecient