get most functionality working