replaced new function for converting variables