better method of extension