fleshed out functions.