size func should return int