beefed out the required functions. time to debug.