Much simpler way to go about this