code improvements as per cronos