changed function to void