change the way with method assign passed data