breaking out 'interpret' function into its own module