@haroonrasheed333 there's quite some copy/pasting with the code above, can we abstract it to make it more DRY?