Add random function to EL, close #871