use sizeof you lazy
pass transfer size as a param
transfer size define