Changed name function to accept parameter