added functions for generate number to binding