ref #13 add cast function in abstract uniform