separating parser into its own module