change to use extension function