Starting to create function to do all this.