changed parse to protected, updated testcases