use float as chance input
refactor callbacks to be more general