cast variables before they are copied to gpu
add cast varibles to single befor cp to GPU