completed ui and functionality