You should write a function for this.