created user_data() function