almost hacked together a working solution for specs