code for postdoc programming challenge