added randreal() function