Messy first attempt