finish most functionality