Random Function Improved