mimicked example application code from dwilkie github example