fleshed out leader operation and program typechecks