Did some research on passing data to functions