Hacked a final working solution