updated old version to use newer features