Made destination flexible
Added int cast