not sure if I'm gonna write this in c or not