update code to add methods that helped to give a better user experience