add randomization and remove unneeded callback