if i wrote this in OOP i would do it like this