Added my own code from scratch