Revert "Revert "added tests""

This reverts commit d140c655dc08df77b1cb9017b8600350a724bb57.
Fixed all the shenanigans that happened because of the accidental merge then rebase