Please check wether there is a function provided by some eclass for this.