Still need to add tests... not sure if this is right yet. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>