Written function. Not a great deal