Fully functional version! But slow...