utility
add math helper for copy, swap and random variables