made the dislay function work