added extension functions