the old code from hackathon