Thanks a lot for your feedback. I looked into the macros to get the type. It got bit messy but yes to make it more generic I will need to use macro.
I will be creating a macro which will generate all of this code. As usual it will take time to use best method in Nim as I might not be aware of these :). Hoover, with bit of direction I am sure I will bet Thanks