fleshed out a few functions