fleshed out, most functionality implemented