adding new version without global variable