- use states to display ui properly