expanding into a (hopefully) workable function