Add a reusable function to display stars