inital parser implementation, and input bit triming