- renamed cast functions and use autorename for ruby