big refactor of parse & test to be more readable