add some clever functions